package com.chushouya.manager.constants;

import com.general.framework.core.enums.IEnum;

import java.util.Objects;

/**
 * 推送方式（站内通知/站内弹窗/App推送/App弹窗/短信通知/微信通知）
 */
public enum NoticePushTypeEnum implements IEnum<Integer> {
    station_notice(1, "站内通知"),
    station_popup( 2, "站内弹窗"),
    app_push(      3, "App推送"),
    app_popup(     4, "App弹窗"),
    sms(           5, "短信通知")
    ;

    private Integer value;

    private String desc;

    NoticePushTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (NoticePushTypeEnum thisEnum : NoticePushTypeEnum.values()) {
            if (Objects.equals(thisEnum.value, value)) {
                return thisEnum.desc;
            }
        }
        return "";
    }

    @Override
    public Integer value() {
        return this.value;
    }

    @Override
    public String named() {
        return this.desc;
    }
}
